import request from '@/utils/request'

// 查询服务类别列表
export function listClass(query) {
  return request({
    url: '/carService/class/list',
    method: 'get',
    params: query
  })
}

// 商户信息列表
export function listMerchant(query) {
  return request({
    url: '/carService/merchant/list',
    method: 'get',
    params: query
  })
}

// 查询服务类别详细
export function getClass(serviceId) {
  return request({
    url: '/carService/class/' + serviceId,
    method: 'get'
  })
}

// 新增服务类别
export function addClass(data) {
  return request({
    url: '/carService/class',
    method: 'post',
    data: data
  })
}

// 修改服务类别
export function updateClass(data) {
  return request({
    url: '/carService/class',
    method: 'put',
    data: data
  })
}

// 删除服务类别
export function delClass(serviceId) {
  return request({
    url: '/carService/class/' + serviceId,
    method: 'delete'
  })
}
